<?
defined( '_JEXEC' ) or die( 'Restricted access' );


class apipull
{
	var $errno;
	var $error;
	
	public function get_data($lang,$url,$throttle)
	{
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
		curl_setopt($ch, CURLOPT_TIMEOUT,		 isset($options['timeout']) ? $options['timeout'] : 10);
		curl_setopt($ch, CURLOPT_VERBOSE,		 isset($options['verbose']) ? $options['verbose'] : false);

		$response	    = curl_exec($ch);
		$headers		= curl_getinfo($ch);
		apipull::errno	= curl_errno($ch);
		apipull::error	= curl_error($ch);

		curl_close($ch);
		if (apipull::errno) 
		{
			return false;
		}
		else
		{
			$data = json_decode($response, true);
			return $data;
		}
	}
	
	public function storemembers($data)
	{
		echo 'Im gona store data!<br>';
	}
}






}
?>